package com.example.graduation.entity.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.sql.Timestamp;
import java.time.LocalDateTime;

/**
 * @author Jeffery
 * Image实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("image")
public class Image implements Serializable {
    @ApiModelProperty(value = "imageID")
    @TableId(value = "image_id")
    private String id;

    @ApiModelProperty(value = "用户ID")
    @TableField(value = "user_id")
    private String uId;

    @ApiModelProperty(value = "image二进制")
    @TableField(value = "image_blog")
    private byte[] blog;

    @ApiModelProperty(value = "文件扩展名")
    @TableField(value = "image_exc")
    private String exc;

    @ApiModelProperty(value = "image创建时间")
    @TableField(value = "image_create_time", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createTime;

    @ApiModelProperty(value = "image修改时间")
    @TableField(value = "image_update_time", fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp updateTime;

    @ApiModelProperty(value = "image_version")
    @TableField(value = "image_version")
    private int version;

    @ApiModelProperty(value = "逻辑删除 0:未删除 1:已删除")
    @TableField(value = "image_has_deleted")
    private int isDeleted;
}
